home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 1 (Walnut Creek)
/
Aminet - June 1993 [Walnut Creek].iso
/
aminet
/
util
/
misc
/
vhlogger_v2.lzh
/
usnet.vh
< prev
next >
Wrap
Text File
|
1992-08-30
|
2KB
|
92 lines
/* usnet.vh Copyright (c) 1992 Vincent J. Herried
1688 Staffordshire RD.
Columbus, OH 43229
KA8CTE */
/*
Function: Read in a sequential ascii text file,
parse it, get the call signs out,
search the vhlogger data base for the call sign,
If it does not exist in my vhlogger data base then
add it.
Arguments: None
History:
Version 2 08/30/92 add correct test for EOF
Version 1 02/04/92 initial version.
*/
options results
address "vhlogger"
/* Open the ascii input file that we are going to parse for call signs */
say "Enter a ascii input file name or 'end'?"
parse pull file
if file = "END" then exit(0)
if (open("input",file,"Read") = 0) then do
say "Open failed for file" file
exit(0)
end
dateval="920702" /* date of this ascii file was built */
startt=time()
count=0
do while(get())
parse var in address '(' name ')' callsign junk
if substr(address,1) = '#' then iterate
if callsign = "" then iterate
if name = "" then iterate
count = count +1
callsign = strip(callsign)
len=length(callsign)
if (len > 10 | len < 3 )then iterate
address = strip(address)
if index(address,"GEnie") ~= 0 then do
say "skiping genie address"
iterate
end
name = strip(name)
say "Call="callsign "Name="name "Address="address
update=callsign';'name';'dateval';;;;;;;;;'address';'
'find' callsign
if rc = 0 then iterate /* already in data base, skip it */
ans='A'
do while(ans ~= 'A' & ans ~= 'S' & ans ~= 'E')
say "reply Add, Skip, or End"
pull ans
end
if ans = 'E' then exit(0)
if ans = 'S' then iterate
'update' update
end
close('input')
say "count"count "start time" startt "end time" time()
say "all done, bye"
exit(0)
get:
in=''
b_count = 0
do while(in='')
in=readln("input")
b_count = b_count +1
if b_count > 20 then return(0) /* more than 20 blank lines = eof? */
if eof("input") = 1 then return(0) /* really End Of File */
end
in=translate(in,' ','09'x,)
return(1)